package databases

import (
	_ "github.com/go-sql-driver/mysql"
	"github.com/jinzhu/gorm"
)

var DbDefault *gorm.DB

var SearchDB *gorm.DB

func MysqlInit(driver, dns string) {
	db, err := gorm.Open(driver, dns)
	if err != nil {
		panic(err)
	}
	DbDefault = db
}

func SearchDbInit(driver, dns string) {
	db, err := gorm.Open(driver, dns)
	if err != nil {
		panic(err)
	}
	SearchDB = db
}
